<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <input name="Fruit" type="radio" value="胡桃" onclick="fun(this)"/>胡桃
    <input name="Fruit" type="radio" value="刻晴" onclick="fun(this)"/>刻晴
    <input name="Fruit" type="radio" value="可以" onclick="fun(this)"/>可以
    <br>
        <input name="aa" type="checkbox" value="胡桃"/>胡桃
        <input name="aa" type="checkbox" value="刻晴"/>刻晴
        <input name="aa" type="checkbox" value="可以"/>可以
        <input type="submit" value="提交" onclick="tijiao()">
        <br>
        <select name="select" id="ff">
            <option value="湖南">湖南</option>
            <option value="江西" selected="select">江西</option>
            <option value="越南">越南</option>
        </select>
        <input type="text" class="item" id="item">
        <input type="submit" value="确定" onclick="queding()">
    
</head>
<body>
    <script>
        function queding(){
            let item=document.getElementById("item").value;
            let ff=document.getElementById("ff");
            ff.innerHTML+="<option value="+item+'>'+item+'</option>";';
        }
        function tijiao(){
            var g=document.getElementsByName("aa");
            for(let i in g){
                if(g[i].checked){//判断多选框有没有被选中
                    console.log(g[i].value);
                }
                
            }
        }
        window.onload = function () {//网页加载完毕事件
           var a=[1,2,3,2,1,2];
           var a1=[1,2,3,2,1,3];
           var a2=[1,2,3,2,1,4];
           var obj={
            "name":"狗头",
            "age":18,
            "addr":"湖南长沙",
            "sr":new Date(),
           }
           item(a);
           item(a1);
           item(a2);
           item(obj);
           let object=a.concat(a1).concat(a2);
           console.log(object);

           
        }
        function item(a){
            for(let i in a){
                console.log(a[i]);
            }
        }
        function fun(a){
            console.log(a.value);
        }
    </script>
</body>
</html>